home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group98b.txt / 000060_icon-group-sender _Wed Jun 3 08:17:24 1998.msg < prev    next >
Internet Message Format  |  2000-09-20  |  2KB

  1. Return-Path: <icon-group-sender>
  2. Received: from kingfisher.CS.Arizona.EDU (kingfisher.CS.Arizona.EDU [192.12.69.239])
  3.     by baskerville.CS.Arizona.EDU (8.8.8/8.8.7) with SMTP id IAA00835
  4.     for <icon-group-addresses@baskerville.CS.Arizona.EDU>; Wed, 3 Jun 1998 08:17:23 -0700 (MST)
  5. Received: by kingfisher.CS.Arizona.EDU (5.65v4.0/1.1.8.2/08Nov94-0446PM)
  6.     id AA07445; Wed, 3 Jun 1998 08:17:16 -0700
  7. From: "Nevin :-] Liber" <nevin@pendragon-software.com>
  8. To: <icon-group@optima.CS.Arizona.EDU>
  9. Subject: Re: Directory access facilities
  10. Date: Tue, 2 Jun 1998 21:00:33 -0500
  11. Message-Id: <01bd8e93$64a4caa0$c37546cf@NEVIN>
  12. Mime-Version: 1.0
  13. Content-Type: text/plain;
  14.     charset="iso-8859-1"
  15. Content-Transfer-Encoding: 7bit
  16. X-Priority: 3
  17. X-Msmail-Priority: Normal
  18. X-Mailer: Microsoft Outlook Express 4.71.1712.3
  19. X-Mimeole: Produced By Microsoft MimeOLE V4.71.1712.3
  20. Errors-To: icon-group-errors@optima.CS.Arizona.EDU
  21. Status: RO
  22. Content-Length: 1478
  23.  
  24. From: Gregg Townsend <gmt@baskerville.CS.Arizona.EDU>
  25. To: icon-group@baskerville.CS.Arizona.EDU
  26. <icon-group@baskerville.CS.Arizona.EDU>
  27. Date: Tuesday, June 02, 1998 2:26 PM
  28. Subject: Re: Directory access facilities
  29.  
  30.  
  31. >I'd prefer a simple built-in function that would generate the names
  32. >of the files contained in a directory, e.g.
  33. > contents(s)
  34. >with other mechanisms (if any) used for finding attributes.
  35.  
  36.  
  37. I agree with you here, Gregg.  Probably need to, as a minimum, add a second
  38. function to determine if a given string refers to a directory name.
  39. Something like:
  40.  
  41. dir(sDirectory) - generator that returns filenames in directory
  42. string(sDirectory), one name at a time.  No guarantee to the order in which
  43. directory entries are returned.
  44. isdir(sDirectory) - returns sDirectory if string(sDirectory) refers to a
  45. directory; otherwise fails
  46.  
  47. One might be tempted to use initial failure from dirname() to determine if a
  48. given directory is empty; however, this doesn't work in general, as on some
  49. systems it might not be possible to differentiate between a non-existant
  50. directory and an empty directory.
  51.  
  52. I would also vote against filtering out "." and ".."; dir() should return an
  53. accurate representation of what is in the directory, and not require any
  54. special casing (and it is trivial to filter this out at a higher level).
  55. __
  56.  Nevin ":-)" Liber  <mailto:nevin@pendragon-software.com>  (847) 816-9926
  57.   Senior Software Engineer, Pendragon Software <http://www.webfayre.com/>
  58.  
  59.